package com.glinsoft.cg.context;

import com.glinsoft.cg.database.Table;

import java.util.Map;

public class FileGenerationContext {

    private String parentPackage;
    private Table table;
    private Map param;
    private String javaBeanName;

    public FileGenerationContext() {
    }

    public String getParentPackage() {
        return parentPackage;
    }

    public Table getTable() {
        return table;
    }

    public Map getParam() {
        return param;
    }

    public String getJavaBeanName() {
        return javaBeanName;
    }

    public void setParentPackage(String parentPackage) {
        this.parentPackage = parentPackage;
    }

    public void setTable(Table table) {
        this.table = table;
    }

    public void setParam(Map param) {
        this.param = param;
    }

    public void setJavaBeanName(String javaBeanName) {
        this.javaBeanName = javaBeanName;
    }

    public boolean equals(Object o) {
        if (o == this)
            return true;
        if (!(o instanceof FileGenerationContext))
            return false;
        FileGenerationContext other = (FileGenerationContext) o;
        if (!other.canEqual(this))
            return false;
        Object this$parentPackage = getParentPackage();
        Object other$parentPackage = other.getParentPackage();
        if (this$parentPackage != null ? !this$parentPackage.equals(other$parentPackage) : other$parentPackage != null)
            return false;
        Object this$table = getTable();
        Object other$table = other.getTable();
        if (this$table != null ? !this$table.equals(other$table) : other$table != null)
            return false;
        Object this$param = getParam();
        Object other$param = other.getParam();
        if (this$param != null ? !this$param.equals(other$param) : other$param != null)
            return false;
        Object this$javaBeanName = getJavaBeanName();
        Object other$javaBeanName = other.getJavaBeanName();
        return this$javaBeanName != null ? this$javaBeanName.equals(other$javaBeanName) : other$javaBeanName == null;
    }

    protected boolean canEqual(Object other) {
        return other instanceof FileGenerationContext;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Object $parentPackage = getParentPackage();
        result = result * 59 + ($parentPackage != null ? $parentPackage.hashCode() : 43);
        Object $table = getTable();
        result = result * 59 + ($table != null ? $table.hashCode() : 43);
        Object $param = getParam();
        result = result * 59 + ($param != null ? $param.hashCode() : 43);
        Object $javaBeanName = getJavaBeanName();
        result = result * 59 + ($javaBeanName != null ? $javaBeanName.hashCode() : 43);
        return result;
    }

    public String toString() {
        return (new StringBuilder()).append("FileGenerationContext(parentPackage=").append(getParentPackage()).append(", table=").append(getTable()).append(", param=").append(getParam()).append(", javaBeanName=").append(getJavaBeanName()).append(")").toString();
    }
}
